﻿Public Class Login
    Inherits System.Web.UI.Page
    Dim ws As New ClientWebService.GetDataSoapClient
    Dim userInfo(1) As String
    Public Shared alliance As String = "FF"


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        lblFout.Visible = False
    End Sub

    Protected Sub Loginbtn_MyEvent(ByVal sender As Object, ByVal e As EventArgs) Handles LoginWithPassword1.btnEvent
        If (ws.Web_CheckIfUserExists(LoginWithPassword1.GebruikersNaam)) Then
            If (ws.Web_GetPassword(LoginWithPassword1.GebruikersNaam).Equals(LoginWithPassword1.Paswoord)) Then
                userInfo(0) = LoginWithPassword1.GebruikersNaam
                userInfo(1) = LoginWithPassword1.Paswoord
                Session("New") = userInfo
                Response.Redirect("TravianIRC.aspx")
            Else
                lblFout.Visible = True
                lblFout.Text = "Foutieve Gebruikersnaam en/of paswoord !"
            End If
        Else
            lblFout.Visible = True
            lblFout.Text = "Foutieve Gebruikersnaam en/of paswoord !"
        End If

    End Sub
End Class